﻿using System.Data;
using System.Runtime.Serialization;
using System.ServiceModel;

namespace HRMService
{
    [ServiceContract(Namespace = "http://HRMService")]
    public interface IGrade
    {
        [OperationContract]
        int Grade_Using(int GradeID);

        [OperationContract]
        DataSet Grade_GetAll();

        [OperationContract]
        DataSet Grade_GetWithPosition(int GradeID);

        [OperationContract]
        DataSet Grade_GetByBranch(int BranchID);

        [OperationContract]
        GradeInfo Grade_GetInfo(int GradeID);

        [OperationContract]
        DataSet Grade_GetList(out int ItemCount,string branchcode, int currentPage, int pageSize);

        [OperationContract]
        int Grade_Insert(GradeInfo eInfo);

        [OperationContract]
        bool Grade_Update(GradeInfo eInfo);

        [OperationContract]
        bool Grade_Delete(int GradeID);
    }
    [DataContract(Namespace = "http://HRMService")]
    public class GradeInfo
    {
       int _ID;
        [DataMember]
        public int ID
        {
            get { return _ID; }
            set { _ID = value; }
        }

        string _Name;
        [DataMember]
        public string Name
        {
            get { return _Name; }
            set { _Name = value; }
        }
        string _BranchCode;
        [DataMember]

        public string BranchCode
        {
            get { return _BranchCode; }
            set { _BranchCode = value; }
        }
    }
}
